<div class="panel bg3 panel-container" id="attach-panel">
	<div class="inner">

	<p>{L_ADD_ATTACHMENT_EXPLAIN} <span class="hidden" id="drag-n-drop-message">{L_PLUPLOAD_DRAG_TEXTAREA}</span></p>
	{% if MAX_ATTACHMENT_FILESIZE is not empty %}<p>{{ MAX_ATTACHMENT_FILESIZE }}</p>{% endif %}

	<fieldset class="fields2" id="attach-panel-basic">
	<dl>
		<dt><label for="fileupload">{L_FILENAME}{L_COLON}</label></dt>
		<dd>
			<input type="file" accept="{{ ALLOWED_ATTACHMENTS }}" name="fileupload" id="fileupload" class="inputbox autowidth" />
			<input type="submit" name="add_file" value="{L_ADD_FILE}" class="button1 button button-form-bold" onclick="upload = true;" />
		</dd>
	</dl>
	<dl>
		<dt><label for="filecomment">{L_FILE_COMMENT}{L_COLON}</label></dt>
		<dd><textarea name="filecomment" id="filecomment" rows="1" cols="40" class="inputbox autowidth">{FILE_COMMENT}</textarea></dd>
	</dl>
	</fieldset>

	<div id="attach-panel-multi" class="attach-panel-multi">
		<input type="button" class="button1 button button-form-bold" value="{L_PLUPLOAD_ADD_FILES}" id="add_files" />
	</div>

	{% EVENT posting_attach_body_file_list_before %}
	<div class="panel<!-- IF not .attach_row --> hidden<!-- ENDIF --> file-list-container" id="file-list-container">
		<div class="inner">
			<table class="table1 zebra-list fixed-width-table">
				<thead>
					<tr>
						<th class="attach-name">{L_PLUPLOAD_FILENAME}</th>
						<th class="attach-comment">{L_FILE_COMMENT}</th>
						<th class="attach-filesize">{L_PLUPLOAD_SIZE}</th>
						<th class="attach-status">{L_PLUPLOAD_STATUS}</th>
					</tr>
				</thead>
				<tbody class="responsive-skip-empty file-list" id="file-list">
					<tr class="attach-row attach-row-tpl" id="attach-row-tpl">
							<td class="attach-name">
								<span class="file-name ellipsis-text"></span>
								<span class="attach-controls">
									{% if S_BBCODE_ALLOWED %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button1 button button-form-bold hidden file-inline-bbcode" />&nbsp;{% endif %}
									<input type="button" value="{L_DELETE_FILE}" class="button1 button button-form-bold file-delete" />
								</span>
								<span class="clear"></span>
							</td>
							<td class="attach-comment">
								<textarea rows="1" cols="30" class="inputbox"></textarea>
							</td>
							<td class="attach-filesize">
								<span class="file-size"></span>
							</td>
							<td class="attach-status">
								<span class="file-progress">
									<span class="file-progress-bar"></span>
								</span>
								<span class="file-status"></span>
							</td>
					</tr>
					{% EVENT posting_attach_body_attach_row_before %}
					<!-- BEGIN attach_row -->
						{% EVENT posting_attach_body_attach_row_prepend %}
						<tr class="attach-row" data-attach-id="{attach_row.ATTACH_ID}">
							<td class="attach-name">
								<span class="file-name ellipsis-text"><a href="{attach_row.U_VIEW_ATTACHMENT}">{attach_row.FILENAME}</a></span>
								{% EVENT posting_attach_body_attach_row_controls_prepend %}
								<span class="attach-controls">
									{% if S_BBCODE_ALLOWED and S_INLINE_ATTACHMENT_OPTIONS %}<input type="button" value="{{ lang('PLACE_INLINE') }}" class="button1 button button-form-bold file-inline-bbcode" />&nbsp;{% endif %}
									<input type="submit" name="delete_file[{attach_row.ASSOC_INDEX}]" value="{L_DELETE_FILE}" class="button1 button button-form-bold file-delete" />
								</span>
								{% EVENT posting_attach_body_attach_row_controls_append %}
								<span class="clear"></span>
							</td>
							<td class="attach-comment">
								<textarea name="comment_list[{attach_row.ASSOC_INDEX}]" rows="1" cols="30" class="inputbox">{attach_row.FILE_COMMENT}</textarea>
								{attach_row.S_HIDDEN}
							</td>
							<td class="attach-filesize">
								<span class="file-size">{attach_row.FILESIZE}</span>
							</td>
							<td class="attach-status">
								<span class="file-status file-uploaded"></span>
							</td>
						</tr>
						{% EVENT posting_attach_body_attach_row_append %}
					<!-- END attach_row -->
					{% EVENT posting_attach_body_attach_row_after %}
				</tbody>
			</table>
		</div>
	</div>
	{% EVENT posting_attach_body_file_list_after %}
	</div>
</div>
